﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SmartMD.DataModel.Entity
{
    public class SysInfoEntity : BusinessEntity
    {
        //private string _id;
        //private string _name;
        private string _value;
        private string _description;

        public override void setValue(string key, Object value)
        { 
            if (value is System.DBNull)
                return;
            switch (key.ToLower())
            {
                case "id":
                    this.Id = (string)value;
                    break;
                case "name":
                    this.Name = (string)value;
                    break;
                case "value":
                    this.Value = (string)value;
                    break;
                case "description":
                    this.Description = (string)value;
                    break;
            }
        }

        public String Value
        {
            get
            {
                return _value;
            }
            set
            {
                this._value = value;
                this.OnPropertyChanged("Value");
            }
        }

        public String Description
        {
            get
            {
                return _description;
            }
            set
            {
                this._description = value;
                this.OnPropertyChanged("Description");
            }
        }
    }
}
